<!--
 * @Author: chenchao
 * @Date: 2022-08-03 10:43:25
 * @LastEditors: chenchao
 * @LastEditTime: 2022-08-03 16:46:08
 * @Description: 
-->
<template>
    <van-nav-bar
        title="电影"
        left-text="苏州"
        @click-left="onClickLeft"
        fixed="true"
        />
        <div class="chosefilm">
            <ul>
                <li @click="changeStatus(item.val)" v-for="item in topMenu" :key="item.val">
                    <p :class="{acolor:active===item.val}">{{item.name}}</p>
                </li>
            </ul>
        </div>
        <router-view></router-view>
</template>

<script>
// @ is an alias to /src
import HelloWorld from '@/components/HelloWorld.vue'

export default {
    data(){
        return{
            active:"nowshow",
            topMenu:[
                {name:"正在热映",val:"nowshow"},
                {name:"即将上映",val:"comingsoon"}
            ]
        }
    },
    methods:{
        onClickLeft(){
            this.$router.push("/city");
        },
        changeStatus(val){
            this.active = val;
            this.$router.push("/enter/film/"+val);
        }
    }
}
</script>
